﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;


public enum ColorType
{
    red,
    green,
    blue,
}

public class ShuaiFunction
{
    //public static void ChangeType()
    //{
    //    colorType += 1;

    //    if (Convert.ToInt32(colorType) > Convert.ToInt32(ColorType.blue))
    //    {
    //        colorType = ColorType.red;
    //    }
    //    Refresh();
    //}

    public static void Refresh(SpriteRenderer _sp, ColorType _colorType)
    {
        if (_colorType == ColorType.red)
        {
            _sp.color = Color.red;
        }
        else if (_colorType == ColorType.green)
        {
            _sp.color = Color.green;
        }
        else if (_colorType == ColorType.blue)
        {
            _sp.color = Color.blue;
        }
    }
}
